// @ts-ignore
import { LoginParams, login,LoginResult } from '@/api/backend/auth';
// @ts-ignore
import { defineStore } from 'pinia'

let useUserStore=defineStore("user",{

    state:()=>{
      return {
          userInfo:{}
      }
    },
    actions : {
        async userLogin(loginRequest:LoginParams){
            const loginResult:LoginResult = await login(loginRequest)
            console.log(loginResult)
            this.userInfo=loginResult.data
        },

        gethaha(){
        }
    },
    getters:{}

})

export default useUserStore